<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='设施设备-添加',jsPaths='/static/js/devices/device/add.js')">
<div class="right" th:fragment="right">
            <!--面包屑-->
            <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="/devices">设备管理</a>
                    <a href="/devices">设施设备</a>
                    <a><cite>新增</cite></a>
                </span>
            </div>

            <!--主体内容区-->
            <div class="form-content layui-container">
                    <form class="layui-form" th:action="@{/devices/save}" method="post">
                        <div class="layui-form-item">
                            <label class="layui-form-label must">设备名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="name"  maxlength="255"  lay-verify="required" placeholder="请输入设备名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label must">设备编号</label>
                            <div class="layui-input-block">
                                <input type="text" name="code"   maxlength="255" placeholder="请输入设备编号" autocomplete="off" class="layui-input"  lay-verify="required">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label must">设备价格</label>
                            <div class="layui-input-block">
                                <input type="number" min="0" value="0" oninput="if(value.length>10){value=value.slice(0,10)}else if (value.length==0){value=0}" lay-verify="required" name="price" placeholder="请输入设备价格" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label must">设备类型</label>
                            <div class="layui-input-block">
                                <select name="type" lay-verify="required">
                                    <option></option>
                                    <option value="1">房间设备</option>
                                    <option value="2">公共服务设备</option>
                                    <option value="3">医疗康复设备</option>
                                    <option value="4">安全保障设备</option>
                                    <option value="5">行政办公设备</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label must">设备位置</label>
                            <div class="layui-input-block">
                                <input type="text" name="position"   placeholder="请输入设备位置" autocomplete="off" class="layui-input"  lay-verify="required" maxlength="255">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                                <a href="/devices" class="layui-btn layui-btn-primary">返回</a>
                            </div>
                        </div>
                    </form>

            </div>
        </div>
</html>